{% extends 'base.html' %}
{% block title %}Welcome to my blog{% endblock %}

{% block content %}
{{request.flavour}}
<h2>{% if flavour == "mobile" %}(mobile version){% endif %}博客</h2>
<div class="row">
    {% if posts %}
    {% for post in posts %}
    <div class="col-sm-4">
        <h2><a href="{{ post.get_absolute_url }}" id="">{{ post.title }}</a></h2>
        {{post.body | slice:":80"}}
        {{post.posted}} - By {{post.author}}
    </div>
    {% endfor %}
    {% else %}
    <p>There are no posts.</p>
    {% endif %}
</div>
{% endblock %}
